package com.feidee.data.email.util;

import com.feidee.data.email.model.EConstant;
import com.feidee.data.email.model.EmailLogModel;
import com.feidee.fdhadoop.logCollect.LogCollectService;

import java.text.SimpleDateFormat;
import java.util.Date;


public class EmailUtil {

	public static void sendLog(EmailLogModel logs) {
		sendLog(logs, "async");
	}

	public static String getNowTime() {
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		Date date = new Date();
		return format.format(date);
	}

	public static void sendLog(EmailLogModel logs, String model) {
		if ("async".equals(model)) {
			LogCollectService.sendLog(EConstant.EMAIL_LOG_APT, EConstant.EMAIL_LOG_BUS, logs);
		}
	}

	public static void main(String[] args) throws Exception {

	}

}